package org.example.service.impl;

import org.example.mapper.DataStatisticsMapper;
import org.example.pojo.DataStatisticsVo;
import org.example.pojo.JoinJobVo;
import org.example.pojo.OutJobVo;
import org.example.service.DataStatisticsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

/**
 * 数据统计
 *
 * @author Administrator
 * @date 2022/09/01
 */
@Service
public class DataStatisticsServiceImpl implements DataStatisticsService {

    @Autowired
    private DataStatisticsMapper dataStatisticsMapper;

    /**
     * 查询部门数
     *
     * @return int
     */
    @Override
    public int selectDepartmentCount() {
        return dataStatisticsMapper.selectDepartmentCount();
    }

    /**
     * 查询员工数
     *
     * @return int
     */
    @Override
    public int selectEmployeeCount() {
        return dataStatisticsMapper.selectEmployeeCount();
    }

    /**
     * 角色数
     *
     * @return int
     */
    @Override
    public int selectRoleCount() {
        return dataStatisticsMapper.selectRoleCount();
    }

    /**
     * 查询管理员数
     *
     * @return int
     */
    @Override
    public int selectManagerCount() {
        return dataStatisticsMapper.selectManagerCount();
    }

    /**
     * 查询人才数
     *
     * @return int
     */
    @Override
    public int selectTalentsCount() {
        return dataStatisticsMapper.selectTalentsCount();
    }

    /**
     * 选择人才统计
     *
     * @return {@link List}<{@link DataStatisticsVo}>
     */
    @Override
    public List<DataStatisticsVo> selectTalentsStatistics() {
        return dataStatisticsMapper.selectTalentsStatistics();
    }

    /**
     * 选择部门员工数
     *
     * @return {@link Map}<{@link String}, {@link Object}>
     */
    @Override
    public List<DataStatisticsVo> selectDepartmentEmployeeCount() {
        return dataStatisticsMapper.selectDepartmentEmployeeCount();
    }

    /**
     * 查询员工状态数量
     *
     * @return {@link List}<{@link DataStatisticsVo}>
     */
    @Override
    public List<DataStatisticsVo> selectEmployeeGroupBy() {
        return dataStatisticsMapper.selectEmployeeGroupBy();
    }

    /**
     * 选择员工白名单
     *
     * @return int
     */
    @Override
    public int selectEmployeeWhiteList() {
        return dataStatisticsMapper.selectEmployeeWhiteList();
    }

    /**
     * 选择员工黑名单
     *
     * @return int
     */
    @Override
    public int selectEmployeeBlackList() {
        return dataStatisticsMapper.selectEmployeeBlackList();
    }

    /**
     * 每月入职人数
     *
     * @return int
     */
    @Override
    public List<JoinJobVo> selectJoinJob() {
        return dataStatisticsMapper.selectJoinJob();
    }

    /**
     * 每月离职人数
     *
     * @return int
     */
    @Override
    public List<OutJobVo> selectOutJob() {
        return dataStatisticsMapper.selectOutJob();
    }

    /**
     * 员工性别
     *
     * @return {@link List}<{@link DataStatisticsVo}>
     */
    @Override
    public List<DataStatisticsVo> selectSex() {
        return dataStatisticsMapper.selectSex();
    }

    /**
     * 查询在职状态
     *
     * @return {@link List}<{@link DataStatisticsVo}>
     */
    @Override
    public List<DataStatisticsVo> selectJobStatus() {
        return dataStatisticsMapper.selectJobStatus();
    }
}
